﻿@using Phatent.Model.Pages

@{
    Layout = "~/Areas/Home/Views/Shared/_LeftSubNavLayout.cshtml";
}

<div class="t1">
    @if(Phatent.Website.WebContext.Language=="zh"){
        <font>大知投资者全球内部视频会议</font>
        <span>您当前位置：首页 > 投资者关系 > 视频会议</span>
    }else{
        <font>Dazhi investors global internal video conference</font>
        <span>Your Location：Home > Investors > Conference</span>
    }
</div>

<div class="row">
    <div class="span6">
        <div style="padding: 15px">
            <img src="/content/images/meeting.jpg" />
        </div>
    </div>
    @if (Phatent.Website.WebContext.Language == "zh")
    {
        <div class="span6" style="padding-top: 30px">
        <div class="control-group">
            <div class="controls">
                <div class="input-prepend">
                    <span class="add-on"><i class="icon-map-marker"></i></span>
                    <select id="selUserRole">
                        <option value="normal">参会者</option>
                        <option value="host">主持人</option>
                    </select>
                </div>
            </div>
        </div>
        <div class="control-group">
            <div class="controls">
                <div class="input-prepend">
                    <span class="add-on"><i class="icon-user"></i></span>
                    <input id="txtRealName" type="text" placeholder="请输入姓名">
                </div>
            </div>
        </div>
        <div class="control-group">
            <div class="controls">
                <div class="input-prepend">
                    <span class="add-on"><i class="icon-lock"></i></span>
                    <input id="txtPassword" type="password" placeholder="请输入密码">
                </div>
            </div>
        </div>
        <p>
            <button class="btn btn-large btn-primary span7" type="button" id="btnEnter" data-placement="bottom" onclick="Enter()" data-trigger="manual">进 入 会 议</button>
        </p>
    </div>
    }else{
        <div class="span6" style="padding-top: 30px">
        <div class="control-group">
            <div class="controls">
                <div class="input-prepend">
                    <span class="add-on"><i class="icon-map-marker"></i></span>
                    <select id="selUserRole">
                        <option value="normal">Participant</option>
                        <option value="host">Host</option>
                    </select>
                </div>
            </div>
        </div>
        <div class="control-group">
            <div class="controls">
                <div class="input-prepend">
                    <span class="add-on"><i class="icon-user"></i></span>
                    <input id="txtRealName" type="text" placeholder="Your Name">
                </div>
            </div>
        </div>
        <div class="control-group">
            <div class="controls">
                <div class="input-prepend">
                    <span class="add-on"><i class="icon-lock"></i></span>
                    <input id="txtPassword" type="password" placeholder="Password">
                </div>
            </div>
        </div>
        <p>
            <button class="btn btn-large btn-primary span7" type="button" id="btnEnter" data-placement="bottom" onclick="Enter()" data-trigger="manual">Enter the conference</button>
        </p>
    </div>
    }
</div>

<script class="submit">
    function Enter() {
        Whale.Remote.Operation({
            url: "/Home/Function/EnterMeeting",
            parameters: {
                realname: $("#txtRealName").val(),
                password: $("#txtPassword").val(),
                userRole: $("#selUserRole").val()
            },
            success: function (response) {
                var url = "http://202.96.127.165:80/3m/attend.do?meetingNumber=" + response.MeetingNumber + "&userRole=" + $("#selUserRole").val() + "&password=" + $("#txtPassword").val() + "&userName=" + $("#txtRealName").val();
                location.href = url;
            },
            error: function (msg) {
                $("#btnEnter").attr("data-content", msg);
                $('#btnEnter').popover('show');
            }
        });
    }
</script>
